$(document).ready(function() {
	// function to init carousel
	$('.carousel').carousel();
	
	// dashboard code
	$('#myTab a[href="#review"]').tab('show');
		
	$('#myTab a').click(function(e) {
		e.preventDefault();
		
		console.log(this.id);
		
		if (this.id == 'review') {
			$('#progbar').css("width", "20%")
		} else if (this.id == 'places') {
			$('#progbar').css("width", "40%")
		} else if (this.id == 'modify') {
			$('#progbar').css("width", "60%")
		} else if (this.id == 'final') {
			$('#progbar').css("width", "80%")
		} else {
			$('#progbar').css("width", "100%")
		}
	});
	
	$('a[rel="popover"]').popover().click(function(e) {
		e.preventDeafult();
	});
});